Make display test not fail under Wayland
authorMatthias Clasen <mclasen@redhat.com>
Fri, 28 Aug 2015 16:26:25 +0000 (12:26 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 28 Aug 2015 16:26:25 +0000 (12:26 -0400)
This test really only works under X, since it relies on modifying
the DISPLAY env var.

testsuite/gdk/display.c

index 6ca7818f936da6b47abd2c013cdbe9c500264389..297c8e8ae4cfd7389748e182b8c98ad20f9737c5 100644 (file)
@@ -19,6 +19,7 @@ static void
 test_unset_display_subprocess2 (void)
 {
   g_unsetenv ("DISPLAY");
+
   gdk_init (NULL, NULL);
 }
 
@@ -69,6 +70,8 @@ main (int argc, char *argv[])
 {
   g_test_init (&argc, &argv, NULL);
 
+  gdk_set_allowed_backends ("x11");
+
   g_test_add_func ("/display/unset-display", test_unset_display);
   g_test_add_func ("/display/unset-display/subprocess/1", test_unset_display_subprocess1);
   g_test_add_func ("/display/unset-display/subprocess/2", test_unset_display_subprocess2);